import Vue from "vue";
import VueRouter from "vue-router";
import { Cascader } from "vant";

Vue.use(VueRouter);
Vue.use(Cascader);

// 配置路由表
const routes = [
  // 这是我的详情页面
  //* 员工详情页面

  {
    path: "/standard",
    name: "standard",
    component: () => import("@/views/details/StandardDetails")
  },
  {
    path: "/star",
    name: "star",
    component: () =>
      import("@/views/details/StandardDetails/components/DropDownList.vue")
  },

  // 配置页面组件布局路由
  {
    path: "/",
    name: "layout",
    component: () => import("@/views/layout"),
    props: true,
    children: [
      {
        path: "",
        name: "home",
        component: () => import("@/views/layout/components/home.vue")
      },
      {
        path: "/company",
        name: "company",
        component: () => import("@/views/layout/components/homecompany.vue")
      },
      {
        path: "/people",
        name: "people",
        component: () => import("@/views/layout/components/homepeople.vue")
      },
      {
        path: "/my",
        name: "mypage",
        component: () => import("@/views/layout/components/mypage.vue")
      },
      {
        path: "/user/profile",
        name: "user-profile",
        component: () => import("@/views/user-profile")
      },
      {
        path: "/check",
        name: "check",
        component: () => import("@/views/components/checkcom")
      },
      {
        path: "/peopledialog",
        name: "peopledialog",
        component: () => import("@/components/people/peopledialog.vue")
      },
      {
        path: "/user/profile/:id",
        name: "user-profile",
        component: () => import("@/views/user-profile")
      }
    ]
  },
  {
    path: "/my/identCheck/:id",
    name: "Identcheck",
    component: () => import("@/components/IdentCheck")
  },
  {
    path: "/Herdetails",
    name: "Herdetails",
    component: () => import("@/views/details/WorkerDetails")
  },
  {
    path: "/about",
    name: "about",
    component: () => import("@/views/components/aboutour")
  },
  {
    path: "/family",
    name: "family",
    component: () => import("@/views/components/attendants")
  },
  {
    path: "/employment-record",
    name: "employment-record",
    component: () => import("@/views/components/employment-record")
  },
  {
    path: "/applydetails",
    name: "applydetails",
    component: () => import("@/views/details/WorkerDetails/indexs.vue")
  },
  {
    path: "/companydetails",
    name: "companydetails",
    component: () => import("@/views/details/CompanyDetails")
  }
];

const router = new VueRouter({
  routes
});

export default router;
